package com.oa.service.impl;

import java.util.List;

import com.oa.bean.work.Appliance;
import com.oa.bean.work.Atype;
import com.oa.bean.work.Dept;
import com.oa.bean.work.Emp;
import com.oa.dao.WorkDAO;
import com.oa.service.WorkService;

public class WorkServiceImpl implements WorkService {
	
	private WorkDAO workdao;

	public void setWorkdao(WorkDAO workdao) {
		this.workdao = workdao;
	}
	
	@Override
	public Atype atypeSave(Atype atype) {
		return workdao.atypeSave(atype);
	}

	@Override
	public void atypeUpdate(Atype atype) {
		workdao.atypeUpdate(atype);
	}

	@Override
	public void atypeDelete(Atype atype) {
		workdao.atypeDelete(atype);
	}

	@Override
	public Appliance applianceSave(Appliance appliance) {
		return workdao.applianceSave(appliance);
	}

	@Override
	public void applianceUpdate(Appliance appliance) {
		workdao.applianceUpdate(appliance);
	}

	@Override
	public void applianceDelete(Appliance appliance) {
		workdao.applianceDelete(appliance);
	}

	@Override
	public List<Appliance> applianceQueryPager(int page, int pageSize) {
		return workdao.applianceQueryPager(page, pageSize);
	}

	@Override
	public void deptSave(Dept dept) {
		workdao.deptSave(dept);
	}

	@Override
	public Dept deptUpdate(Dept dept) {
		Dept d = workdao.deptUpdate(dept);
		return d;
	}

	@Override
	public void deptDelete(int id) {
		workdao.deptDelete(id);
	}

	@Override
	public List<Dept> deptQueryByPage(int pageNo, int pageSize) {
		List<Dept> list = workdao.deptQueryByPage(pageNo, pageSize);
		return list;
	}

	@Override
	public void empSave(Emp emp) {
		workdao.empSave(emp);
	}

	@Override
	public Emp empUpdate(Emp emp) {
		Emp e = workdao.empUpdate(emp);
		return e;
	}

	@Override
	public void empDelete(int id) {
		workdao.empDelete(id);
	}

	@Override
	public List<Emp> empQueryPage(int pageNo, int pageSize) {
		List<Emp> list = workdao.empQueryPage(pageNo, pageSize);
		return list;
	}

	@Override
	public void getclose() {
		workdao.getClose();
	}

}
